<!-- vue 3 引入百度api -->
<template>
  <div id="allmap"></div>
</template>
 
<script>
import { defineComponent, nextTick, onMounted } from "vue";
export default defineComponent({
  setup() {

    const initMap = () => {
      let Bmap = window.BMap;
      let map = new Bmap.Map("allmap");
      map.centerAndZoom(new Bmap.Point(104.04263635868074, 30.556100647961866), 11);
    };
    onMounted(() => {
      initMap();

    });
    return {

    };
  },
});

</script>
<style  scoped>
#allmap {
  width: 100%;
  height: 100%;
}
</style>